﻿<?xml version="1.0"?>
<!--
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
<!--
<xsl:stylesheet xmlns:xsl="http://www.w3.org/TR/WD-xsl"/>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/transform">
-->
<xsl:output method="html"/>
<xsl:template match="/">
	<!--
	<xsl:script language="javascript">
		
	</xsl:script>
	-->
	<html xmlns="http://www.w3.org/1999/xhtml">
		<head>
			<title>长连接测试</title>
			<script language="javascript" type="text/javascript" src="WebSocket.js"></script>
			<link rel="stylesheet" type="text/css" href="WebSocket.css" />
			<script language="javascript" type="text/javascript">
				<xsl:comment>
					<![CDATA[
					(function (d, $)
					{
						if (!$)
							return;

						$(d).ready(function ()
						{
							$('#WebSocket').show();
							$('#div-message').html(new Date().toLocaleDateString() + ' jQuery test ok!');
						});
					}).call(this, this.document, this.jQuery);
					//]]>
				</xsl:comment>
			</script>
		</head>
		<body>
			<h1 style="text-align: center; font-weight: bold; margin-top: 32px;">Webcome Hong Shijin's Web Server</h1>
			<hr style="width: 50%; text-align: center; margin: 32px auto 32px auto;"/>
			<div>
				<table border="0" cellpadding="2" cellspacing="1">
					<xsl:if test="/*/@href != '/'">
						<tr>
							<td>
								<div>
									* <a href="..">..</a>
								</div>
							</td>
							<td>
								<div>[Folder]</div>
							</td>
							<td>
								<div></div>
							</td>
						</tr>
					</xsl:if>
					<xsl:for-each select="//a">
						<tr>
							<td>
								<div>
									* <a>
										<xsl:attribute name="href">
											<xsl:choose>
												<xsl:when test="@title">
													<xsl:value-of select="@href"/>
												</xsl:when>
												<xsl:otherwise>
													<xsl:value-of select="@href"/>/
												</xsl:otherwise>
											</xsl:choose>
										</xsl:attribute>
										<xsl:value-of select="@href"/>
									</a>
								</div>
							</td>
							<td>
								<div>
									<xsl:choose>
										<xsl:when test="@title">
											<xsl:value-of select="@title"/>
										</xsl:when>
										<xsl:otherwise>
											<span style="font-style: italic;">[Folder]</span>
										</xsl:otherwise>
									</xsl:choose>
									<!--
									<xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>
									<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
									&nbsp;
									-->
								</div>
							</td>
							<td>
								<div>
									<xsl:if test="@time">
										<xsl:value-of select="@time"/>
									</xsl:if>
									<!--
									<xsl:text disable-output-escaping="yes"><![CDATA[&nbsp;]]></xsl:text>
									<xsl:text disable-output-escaping="yes">&amp;nbsp;</xsl:text>
									&nbsp;
									-->
								</div>
							</td>
						</tr>
					</xsl:for-each>
				</table>
			</div>
			<hr style="width: 50%; text-align: center; margin: 32px auto 32px auto;"/>
			<div style="display: none;" id="WebSocket">
				<input type="button" value="Open"/>
			</div>
			<div style="height: 16px; margin-top: 32px; padding-left: 32px;" id="div-message">OK!</div>
			<div style="text-align: right; padding-right: 128px; margin-bottom: 32px;">
				<a href="WebSocket.htm" title="转到：&#x0D;&#x0A;&#x09;连接测试页">
					WebSocket <xsl:value-of select="/*/@time"/>
				</a>
			</div>
			<div></div>
		</body>
	</html>
</xsl:template>
</xsl:stylesheet>
